import { Component, Vue, Prop } from "vue-property-decorator";
import { Tools } from "@/model/tools.ts";
/**
 * 报错原因: Property 'methodFromMixins' does not exist on type 'App'.
 * 解决方案: 添加declare module接口定义
 * 函数参数申明:     declare function get(id: string | number): string
 *               or declare function get(name:string,age:number): string
 * 如果有些参数可有可无，可以加个?表示非必须，declare function render(callback?:()=>void): string
 * js中调用的时候，回调传不传都可以
 * render()
   render(function () {
    alert('finish.')
   })
 * 
 */
declare module "vue/types/vue" {
  interface Vue {
    message: string;
    consoleStr(value: number | string): void;
  }
}
@Component
export class ImgMixin extends Tools {
  public message: string = "测试混合函数Mixins";
  public consoleStr(value: number | string): void {
    console.log(value, "混合函数方法");
  }
}
